package cn.lijiajia3515.cairo.security.web.authentication;

import org.springframework.security.web.util.ThrowableAnalyzer;

import javax.servlet.ServletException;

final class DefaultThrowableAnalyzer extends ThrowableAnalyzer {

	/**
	 * @see org.springframework.security.web.util.ThrowableAnalyzer#initExtractorMap()
	 */
	@Override
	protected void initExtractorMap() {
		super.initExtractorMap();
		registerExtractor(ServletException.class, (throwable) -> {
			ThrowableAnalyzer.verifyThrowableHierarchy(throwable, ServletException.class);
			return ((ServletException) throwable).getRootCause();
		});
	}

}
